home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Presentations / Presentations ’97 / Sessions ’97 / Multiplatform Code⁄Data Sharing / HelloBothWorlds / Shared / CGEView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-06-26  |  714 b   |  58 lines  |  [TEXT/CWIE]

  1. /*
  2.     CGEView.h
  3.     
  4.     Demo cross-platform view class for MacHack '97
  5.         
  6.     Al Evans
  7.     
  8.     6/12/97
  9.     
  10. */
  11.  
  12.  
  13. #ifndef CGEVIEW
  14. #define CGEVIEW
  15.  
  16. #include "common.h"
  17. #include "GElemnts.h"
  18.  
  19.  
  20. class CDemoWindow;
  21.  
  22. class CGEView
  23.  
  24. {
  25.  
  26. //----------
  27. public:
  28. //----------
  29.  
  30.                     CGEView(CDemoWindow *owner, int32 viewResID);
  31. virtual                ~CGEView();
  32.  
  33.  
  34. // Actions handled by the view -- passed from the view's window
  35.  
  36. void                Activate(Boolean activateIt); 
  37. void                Idle();
  38. void                Draw();
  39.  
  40.  
  41. // Obviously, a "real" view would have to handle other events as well
  42. void                HandleMouseDown(Point mousePt);
  43.  
  44.  
  45. //----------
  46. private:
  47. //----------
  48. Boolean                MakeGEWorld(CTabHandle worldColors);
  49.  
  50. GEWorldPtr            mGEWorld;
  51. CDemoWindow*        mOwner;
  52.  
  53. };
  54.  
  55.  
  56.  
  57. #endif
  58.